﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeBehind="CEStockList.aspx.cs" Inherits="StockCrawler.CEStockList" %>

<%@ Register Assembly="DevExpress.Web.v14.2, Version=14.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Data.Linq" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
   <%-- <script type="text/javascript">
        function RefreshData(s, e) {
            var isIncrease = false;
            if (isIncrease.Checked)
                isIncrease = true;

            var numDays = cboNumDaysClient.GetValue();
            if (typeof (detailGridView) != 'undefined')
                detailGridView.PerformCallback("REFRESH|" + isIncrease + "|" + numDays);
        }
    </script>--%>

    <%--<dx:ASPxPanel ID="ASPxPanel1" runat="server" Width="100%">
        <asp:Table ID="Table1" runat="server">
            <asp:TableRow>
                <asp:TableCell>
                    <dx:ASPxRadioButton ID="rbnIncrease" ClientInstanceName="rbnIncreaseClient" runat="server" GroupName="1">
                        <ClientSideEvents CheckedChanged="IncreaseChecked" />
                    </dx:ASPxRadioButton>
                </asp:TableCell>
                <asp:TableCell>
                    <dx:ASPxRadioButton ID="rbnDecrease" ClientInstanceName="rbnDecreaseClient" runat="server" GroupName="1">
                        <ClientSideEvents CheckedChanged="DecreaseChecked" />
                    </dx:ASPxRadioButton>
                </asp:TableCell>
                <asp:TableCell>
                    <dx:ASPxLabel ID="ASPxLabel3" runat="server" Text="Số ngày liên tục"></dx:ASPxLabel>
                </asp:TableCell>
                <asp:TableCell>
                    <dx:ASPxComboBox ID="cboNumDays" ClientInstanceName="cboNumDaysClient" runat="server" SelectedIndex="2">
                        <ClientSideEvents ValueChanged="RefeshData" />
                        <Items>
                            <dx:ListEditItem Text="1" Value="1" />
                            <dx:ListEditItem Text="2" Value="2" />
                            <dx:ListEditItem Text="3" Value="3" Selected="True" />
                            <dx:ListEditItem Text="4" Value="4" />
                            <dx:ListEditItem Text="5" Value="5" />
                        </Items>
                    </dx:ASPxComboBox>
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </dx:ASPxPanel>--%>
    <dx:ASPxGridView ID="StockGridView" ClientInstanceName="masterGridView" runat="server"
        KeyFieldName="id_stock" Width="100%">
        <Columns>
            <dx:GridViewDataTextColumn Caption="ID" FieldName="id_stock" ShowInCustomizationForm="True" Visible="False" VisibleIndex="0" />
            <dx:GridViewDataTextColumn Caption="Mã CK" FieldName="code" ShowInCustomizationForm="True" VisibleIndex="1" Width="50px" />
            <dx:GridViewDataTextColumn Caption="Công ty" FieldName="name" ShowInCustomizationForm="True" VisibleIndex="2" Width="500px" />
        </Columns>
        <Templates>
            <DetailRow>
                <dx:ASPxGridView ID="HistoryGridView1" ClientInstanceName="detailGridView" Width="100%" runat="server" AutoGenerateColumns="false">
                    <Columns>
                        <%--<dx:GridViewDataDateColumn FieldName="code" VisibleIndex="1" Width="70" Caption="Mã">
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewDataDateColumn FieldName="exchange" VisibleIndex="1" Width="70" Caption="Sàn">
                        </dx:GridViewDataDateColumn>
                        --%>
                        <dx:GridViewDataDateColumn FieldName="ngay_giao_dich" VisibleIndex="1" Width="70" Caption="Ngày GD">
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewDataTextColumn FieldName="gia_dong_cua" VisibleIndex="2" Width="70" Caption="Đóng cửa">
                            <PropertiesTextEdit DisplayFormatString="#,##0.0" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="thay_doi" VisibleIndex="3" Width="80" Caption="Thay đổi (%)">
                            <PropertiesTextEdit DisplayFormatString="#0.0" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="gia_tham_chieu" VisibleIndex="4" Width="80" Caption="Tham chiếu">
                            <PropertiesTextEdit DisplayFormatString="#,##0.0" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="gia_mo_cua" VisibleIndex="5" Width="70" Caption="Mở cửa">
                            <PropertiesTextEdit DisplayFormatString="#,##0.0" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="gia_cao_nhat" VisibleIndex="6" Width="70" Caption="Cao nhất">
                            <PropertiesTextEdit DisplayFormatString="#,##0.0" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="gia_thap_nhat" VisibleIndex="7" Width="70" Caption="Thấp nhất">
                            <PropertiesTextEdit DisplayFormatString="#,##0.0" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="klgd_khop_lenh" VisibleIndex="8" Width="70" Caption="KLGD">
                            <PropertiesTextEdit DisplayFormatString="#,###" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="gtgd_khop_lenh" VisibleIndex="9" Width="100" Caption="GTGD">
                            <PropertiesTextEdit DisplayFormatString="#,###" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="so_lenh_mua" VisibleIndex="14" Width="80" Caption="SL mua">
                            <PropertiesTextEdit DisplayFormatString="#,###" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="kl_dat_mua" VisibleIndex="15" Width="80" Caption="KL đặt mua">
                            <PropertiesTextEdit DisplayFormatString="#,###" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="so_lenh_ban" VisibleIndex="16" Width="80" Caption="SL bán">
                            <PropertiesTextEdit DisplayFormatString="#,###" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="kl_dat_ban" VisibleIndex="17" Width="80" Caption="KL đặt bán">
                            <PropertiesTextEdit DisplayFormatString="#,###" />
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <SettingsBehavior AllowSelectByRowClick="true" />
                    <Settings VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto" VerticalScrollableHeight="460" />
                    <SettingsPager Mode="ShowAllRecords">
                        <PageSizeItemSettings Visible="true" ShowAllItem="true" />
                    </SettingsPager>
                </dx:ASPxGridView>
            </DetailRow>
        </Templates>
        <SettingsDetail ShowDetailRow="true" />
    </dx:ASPxGridView>
</asp:Content>
